<!--
  Generated template for the MorePage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>更多</ion-title>
  </ion-navbar>

</ion-header>

<ion-content>
  <div *ngIf="notLogin">
    <ion-card>
      <ion-card-header text-center>
        登录ImoocQA,体验更多功能
      </ion-card-header>
      <ion-card-content text-center>
        <button (click)="showModal()" ion-button outline small>登录/注册</button>
      </ion-card-content>
    </ion-card>
  </div>

  <div *ngIf="logined">
    <ion-list class="marginTop">
      <button ion-item (click)="gotoUserPage()">
        <ion-avatar item-start>
          <img src="{{headface}}" />
        </ion-avatar>
        <h2>{{userinfo.UserNickName}}</h2>
        <p>查看个人主页或编辑简介</p>
      </button>
    </ion-list>

    <ion-list class="marginTop">
      <ion-list-header>
        我的慕课
      </ion-list-header>

      <button ion-item (click)="gotoDataList('question')">
        <ion-icon name="paper" item-start color="primary"></ion-icon>
        <ion-label>我的提问</ion-label>
      </button>

      <button ion-item  (click)="gotoDataList('favourite')">
        <ion-icon name="star" item-start color="orange"></ion-icon>
        <ion-label>我的关注</ion-label>
      </button>

      <button ion-item  (click)="gotoDataList('answer')">
        <ion-icon name="disc" item-start color="secondary"></ion-icon>
        <ion-label>我的回答</ion-label>
      </button>
      
    </ion-list>

    <ion-list class="marginTop">
        <ion-list-header>
          设置
        </ion-list-header>
  
        <ion-item (click)="gotoDataList('question')">
          <ion-icon name="cloudy-night" item-start color="purple"></ion-icon>
          <ion-label>夜间模式</ion-label>
          <ion-toggle color="purple" (ionChange)="toggleChangeTheme()"></ion-toggle>
        </ion-item>
        
        <button ion-item (click)="gotoScanQRCode()">
          <ion-icon name="qr-scanner" item-start color="dark"></ion-icon>
          <ion-label>扫描二维码</ion-label>
        </button>

        <button ion-item (click)="gotoVersions()">
          <ion-icon name="help-circle" item-start color="dark"></ion-icon>
          <ion-label>关于</ion-label>
        </button>

      </ion-list>

  </div>
</ion-content>
